include ../../config.mk
target = test pcre_test

.PHONY: all clean install

all:$(target)
clean:
	$(RM) $(target)
	$(RM) test.o pcre_test.o

#install:
#$(warning test folder not need install target!)

pcre_test:pcre_test.o
	$(CC) -Wall -g -o $@ $^ -L../../reference/pcre-7.9/.libs/ -lpcre
pcre_test.o:pcre_test.c
	$(CC) -Wall -g -o $@ $^ -I../../reference/pcre-7.9/ -c
	
test.o:test.c
	$(CC) -Wall -g -DCUR_CTL\(x\)=test_##x -c $< -o $@
test:test.o
	$(CC) -o $@ $^